package com.recipedb.recipedb.entity;

import jakarta.persistence.*;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@Entity
@Table(name = "recipe_difficulty_vote")
@IdClass(RecipeDifficultyVoteId.class)
public class RecipeDifficultyVote {

    @Id
    @Column(name = "user_id")
    private Long userId;

    @Id
    @Column(name = "recipe_id")
    private Long recipeId;

    @Column(name = "difficulty_score", nullable = false)
    private Integer difficultyScore;

    @Column(name = "voted_at")
    private LocalDateTime votedAt;
}